FROM golang:1.17

MAINTAINER Qiang Zhou

WORKDIR /root/dcache

COPY . /root/dcache

WORKDIR /root/dcache

RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
#RUN go env -w GOPROXY=https://goproxy.io,direct

RUN go mod download -x

RUN go mod download github.com/ugorji/go

RUN go build main.go

EXPOSE 10240

CMD [ "./main" ]
